#include <iostream>
//#include <map>
#include <set>

using namespace std;

int main()
{
#if 0
	map<int, int> m;
	auto less = m.key_comp();
	cout << less(3, 5) << endl;
#endif
	struct Intv
	{
		int _left = 0;
		int _right = 0;

		auto operator<=>(const Intv& other) const->std::strong_ordering
		{
			if (_left < other._left)
				return std::strong_ordering::less;
			else if (_left > other._left)
				return std::strong_ordering::greater;

			if (_right < other._right)
				return std::strong_ordering::less;
			else if (_right > other._right)
				return std::strong_ordering::greater;

			return std::strong_ordering::equal;
		}
	};

	std::set<Intv> s;
	s.insert({ 16, 21 });
	s.insert({ 8, 9 });
	s.insert({ 25, 30 });
	s.insert({ 5, 8 });
	s.insert({ 15, 23 });
	s.insert({ 17, 19 });
	s.insert({ 0, 3 });
	s.insert({ 6, 10 });
	s.insert({ 19, 20 });

	return 0;
}